package cn.ingrun.utils.controller.mapper;


import cn.ingrun.utils.redisCache.inter.EnableRedisCache;
import cn.ingrun.utils.controller.User;
import org.springframework.stereotype.Service;

@Service
public class UserMapper {

    @EnableRedisCache(cacheTime = 60 * 5)
    public User getUser(int id){
        User user = new User();
        user.setId(id);
        user.setUsername("mapperUserName");
        user.setPassword("mapperPassword");
        return user;
    }


    @EnableRedisCache( cacheTime = 60 * 20)
    public short getSum(String username){
        System.out.println("执行了mapper层");
        return (short)username.length();
    }

}
